Socket
Socket
Sign inDemoInstall

color-convert

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

color-convert

Plain color conversion functions


Version published
Weekly downloads
242M
increased by1.06%
Maintainers
2
Weekly downloads
 
Created

What is color-convert?

The color-convert npm package is a library for converting colors between different color models such as RGB, HSL, HSV, HEX, and more. It provides functions for one-to-one, one-to-many, and many-to-one conversions.

What are color-convert's main functionalities?

RGB to HEX conversion

Converts an RGB color value to its HEX representation.

const convert = require('color-convert');
const hexColor = convert.rgb.hex(255, 255, 255);

HEX to HSL conversion

Converts a HEX color value to its HSL representation.

const convert = require('color-convert');
const hslColor = convert.hex.hsl('FFFFFF');

HSL to HSV conversion

Converts an HSL color value to its HSV representation.

const convert = require('color-convert');
const hsvColor = convert.hsl.hsv(360, 100, 100);

Keyword to RGB conversion

Converts a CSS keyword color value to its RGB representation.

const convert = require('color-convert');
const rgbColor = convert.keyword.rgb('blue');

ANSI 16 to HEX conversion

Converts an ANSI 16 color code to its HEX representation.

const convert = require('color-convert');
const hexColor = convert.ansi16.hex(90);

Other packages similar to color-convert

Keywords

FAQs

Package last updated on 28 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc